#!/bin/bash

#DNS panel for BigLinux
#
#Authors:
#  Bruno Goncalves Araujo <www.biglinux.com.br>
#
#License: GPLv2 or later
#################################################


. /usr/share/bigcontrolcenter/default/theme-categories.sh.htm

#Translation
export TEXTDOMAINDIR="/usr/share/locale-langpack"
export TEXTDOMAIN=bigcontrolcenter 

echo '
<script language="JavaScript">
window.resizeTo(640,480);
function NoResize(){
  window.resizeTo(640,480);
}
</script>
'

title=$"Extras para o BrOffice.org"
apply=$"Aplicar"
close=$"Sair"
tip_automatico=$"Utilizar interface de acordo com o Desktop em uso"
tip_kde=$"Melhor integracao com dispositivos, por exemplo CDs e PenDrives"
tip_gnome=$"Melhor compatiblidade com extensoes e integracao com o tema do sistema"

tip_documentacao=$"Aprenda a utilizar os recursos do BrOffice com os guias oficiais."
tip_modelo_arquivos=$"Diversos modelos de arquivos para agilizar o seu trabalho."
tip_extension=$"Faca o download pelo navegador e abra no BrOffice."
tip_template=$"Faca o download pelo navegador e abra no BrOffice."
tip_interface=$"Selecione a interface que mais o agrada."


. /usr/share/bigcontrolcenter/default/theme.sh.htm

cat << EOF
	<script type="text/javascript" src="/usr/share/bigcontrolcenter/default/js/jquery-1.3.2.min.js"></script>


	<script type="text/javascript">
	\$(function() {
		\$("#tabs").tabs({
			event: 'mouseover'
		})
	});

	if (document.images) {
	buttonUp = new Image(); buttonUp.src = "/usr/share/bigcontrolcenter/default/images/category-background.png";
	buttonDown = new Image(); buttonDown.src = "$(echo $HOME)/.bigcontrolcenter/category-background-over.png";
	}

	function turn_off(cell) {
	if (document.images != null) {
	cell.style.backgroundImage = "url('" + buttonUp.src + "')";
	}
	}

	function turn_on(cell) {
	if (document.images != null) {
	cell.style.backgroundImage = "url('" + buttonDown.src + "')";
	}
	}

  </script>





EOF


echo "<title>$title</title><body onResize=\"NoResize();\">"

#header
open_header
echo "$title" '</font><br>' $"Extras e configuracoes especiais para o BrOffice.org."
close_header

echo "<center>" $"BrOffice.org e OpenOffice sao dois nomes que representam o mesmo programa." "</center><p>"

echo "<div id=\"tabs-$1\"><TABLE align=center><tr><td>"

    echo "<a href=\"/usr/share/bigbashview/run.run?xdg-open http://extensions.services.openoffice.org\"" "$mouseover_open" $tip_extension "$mouseover_close>""<table onmouseout=\"turn_off(this)\" onmouseover=\"turn_on(this)\" $bigbash_categories_background_config background=$bigbash_categories_background><tr><td width=30><img src=extension.png></td>"'<td valign="middle">'"$bigbash_categories_font" $"Adicione recursos com extensoes" " </font></td></tr></table></a>"
echo '</td><td width=100%></td><td>'
    echo "<a href=\"/usr/share/bigbashview/run.run?xdg-open http://templates.services.openoffice.org\"" "$mouseover_open" $tip_template "$mouseover_close>""<table onmouseout=\"turn_off(this)\" onmouseover=\"turn_on(this)\" $bigbash_categories_background_config background=$bigbash_categories_background><tr><td width=30><img src=template.png></td>"'<td valign="middle">'"$bigbash_categories_font" $"Modelos de arquivos" " </font></td></tr></table></a>"
echo '</td></tr><tr><td>'

if [ "$(echo $LANG | grep pt)" != "" ]
then
    echo "<a href=\"/usr/share/bigbashview/run.run?xdg-open http://www.broffice.org/docs\"" "$mouseover_open" $tip_documentacao "$mouseover_close>""<table onmouseout=\"turn_off(this)\" onmouseover=\"turn_on(this)\" $bigbash_categories_background_config background=$bigbash_categories_background><tr><td width=30><img src=help.png></td>"'<td valign="middle">'"$bigbash_categories_font" $"Documentação" " </font></td></tr></table></a>"
echo '</td><td width=100%></td><td>'

    echo "<a href=\"/usr/share/bigbashview/run.run?xdg-open http://www.broffice.org/escritorio_aberto\"" "$mouseover_open" $tip_template "$mouseover_close>""<table onmouseout=\"turn_off(this)\" onmouseover=\"turn_on(this)\" $bigbash_categories_background_config background=$bigbash_categories_background><tr><td width=30><img src=template2.png></td>"'<td valign="middle">'"$bigbash_categories_font" $"Mais modelos de arquivos" " </font></td></tr></table></a>"
echo '</td></tr><tr><td>'
fi

    echo "<a href=\"/usr/share/bigbashview/run.run?bigbashview /usr/share/bigcontrolcenter/categories/others/broffice/interface.sh.htm -i /usr/share/bigcontrolcenter/categories/others/broffice/icon.png\"" "$mouseover_open" $tip_interface "$mouseover_close>""<table onmouseout=\"turn_off(this)\" onmouseover=\"turn_on(this)\" $bigbash_categories_background_config background=$bigbash_categories_background><tr><td width=30><img src=interface.png></td>"'<td valign="middle">'"$bigbash_categories_font" $"Selecione a interface (KDE ou Gnome)" " </font></td></tr></table></a>"
echo '</td><td width=100%></td><td>'


echo '</table></div>'




echo "</div><div id=\"rodape\"><button type=button value= $close onClick= parent.location='/usr/share/bigbashview/exemplo2.sh.htm?close=True'>   <img src=\"/usr/share/bigcontrolcenter/default/images/cancel.png\" style=\"vertical-align:top\"  />  $close     </button></div>"

